home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / BLPAL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.6 KB  |  92 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #ifndef __BCPLUSPLUS__
  11. #pragma inline
  12. #endif
  13.  
  14. #include "fli.h"
  15.  
  16. #ifdef __BCPLUSPLUS__
  17. #pragma hdrstop
  18. #endif
  19.  
  20. #define I asm
  21.  
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23. //
  24. // ToggleIntense()
  25. //
  26. // Turns off the blinking bit and permits intense background colors or
  27. // vice-versa
  28. //
  29. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  30.  
  31. int BlazeClass::ToggleIntense()
  32. {
  33.   if (!Intense)
  34.   {
  35.     I mov ax,1a00h    // EGA/VGA
  36.     I int 10h
  37.     int l = _AL;
  38.     int t = _BL;
  39.     if (l==0x1a && t>=4)
  40.     {
  41.       I mov ah,10h
  42.       I mov al,3
  43.       I mov bl,0
  44.       I int 10h
  45.       Intense++;
  46.     }
  47.   }
  48.   else
  49.   {
  50.     I mov ax,1a00h    // EGA/VGA
  51.     I int 10h
  52.     int l = _AL;
  53.     int t = _BL;
  54.     if (l==0x1a && t>=4)
  55.     {
  56.       I mov ah,10h
  57.       I mov al,3
  58.       I mov bl,1
  59.       I int 10h
  60.       Intense=0;
  61.     }
  62.   }
  63.   return Intense;
  64. }
  65.  
  66. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67. //
  68. // ChangePalette()
  69. //
  70. // Changes the color palette on a EGA or VGA
  71. //
  72. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  73.  
  74. int BlazeClass::ChangePalette(int PaletteRegister,int Color)
  75. {
  76.   I mov ax,1a00h      // EGA/VGA
  77.   I int 10h
  78.   int l = _AL;
  79.   int t = _BL;
  80.   if (l==0x1a && t>=4)
  81.   {
  82.     I mov ah,10h
  83.     I mov al,0
  84.     I mov bh,byte ptr Color
  85.     I mov bl,byte ptr PaletteRegister
  86.     I int 10h
  87.     return 1;
  88.   }
  89.   return 0;
  90. }
  91.  
  92.